package com.central.file.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.central.db.mapper.SuperMapper;

import com.central.common.model.FileInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 上传存储db
 *
 * @author td
 */
@Mapper
public interface FileMapper extends SuperMapper<FileInfo> {

    @Insert("INSERT INTO file_info (id,name, is_img, content_type, size, path, url, source, create_time, update_time ) " +
            "VALUES ( #{c.id},#{c.name},#{c.isImg},#{c.contentType},#{c.size},#{c.path}, " +
            "#{c.url},#{c.source},#{c.createTime},#{c.updateTime})")

    @Override
    int insert(@Param("c") FileInfo fileInfo);

    List<FileInfo> findList(Page<FileInfo> page, @Param("f") Map<String, Object> params);
}
